<?php
/**
 * @file 0.php
 * @author Alejandro Dario Simi
 * @date $Date: 2013-06-04 03:02:53 +0000 (Tue, 04 Jun 2013) $
 *
 * $Id: 0.php 68 2013-06-04 03:02:53Z daemonraco@gmail.com $
 * $URL: http://wcomix.googlecode.com/svn/tags/wcomix-1.0-BETA1/install/steps/0.php $
 */

if(defined('__INSTALLER__')) {
	echo "\t\t\t\t<p>This is step {$wciStepCheck}</p>\n";
	echo "\t\t\t\t<p>Basic permission are going to be checked</p>\n";
	echo "\t\t\t\t<p><ul>\n";
	$dirs = array(
			WCSanitizer::SystemPath("{$wcPaths['cache-directory']}"),
			WCSanitizer::SystemPath("{$wcPaths['cache-directory']}/{$wcPaths['cache-thumbs-dirname']}"),
			WCSanitizer::SystemPath("{$wcPaths['cache-directory']}/{$wcPaths['cache-expand-dirname']}"),
			WCSanitizer::SystemPath($wcPaths['logs-directory'])
	);
	foreach($dirs as $dir) {
		echo "\t\t\t\t\t<li>Does '{$dir}' exist?: ";
		if(is_dir($dir)) {
			echo "[OK:Ok]";
		} else {
			$isOkToReload = false;
			$isOkToContinue = false;
			echo "[FL:Failed]";
		}
		echo "</li>\n";
		echo "\t\t\t\t\t<li>Is '{$dir}' writable?: ";
		if(is_writable($dir)) {
			echo "[OK:Ok]";
		} else {
			$isOkToReload = false;
			$isOkToContinue = false;
			echo "[FL:Failed]";
		}
		echo "</li>\n";
	}
	echo "\t\t\t\t</ul></p>\n";
}
?>